<% unless @users.empty? %>
    <div class="export-options">
      <%= link_to "PDF", current_url(:format => :pdf), :target => "_blank" %>
      <%= link_to "CSV", current_url(:format => :csv), :target => "_blank" %>
      <%= link_to "Excel", current_url(:format => :xls), :target => "_blank" %>
    </div>

    <table class="table sortable-table highchart " data-graph-container-before="1" data-graph-type="line" data-graph-xaxis-rotation="-45">
      <thead>
      <tr>
        <th width="800">Name</th>
        <th width="200">Tasks</th>
        <th data-graph-skip="1" width="200">Total hours</th>
        <th width="200" class="hidden_class" data-graph-skip="1">Total hours</th>
        <th width="200" class="hidden_class">Total hours</th>
      </tr>
      </thead>
      <% @users.each do |user| %>
          <tr>
            <td><%= link_to user.name, reports_employee_day_path(:employee_id => user.id, :start_date => @date) %></td>
            <td><%= link_to @tasks[user.id].length, reports_employee_day_path(:employee_id => user.id, :start_date => @date) %></td>
            <td  class="hidden_class"><%= link_to @work_logs[user.id] == {} ? "0" : @work_logs[user.id].gsub(":",""), reports_employee_day_path(:employee_id => user.id, :start_date => @date) %></td>
            <td><%= link_to @work_logs[user.id] == {} ? "0:00" : @work_logs[user.id], reports_employee_day_path(:employee_id => user.id, :start_date => @date) %></td>
            <td  class="hidden_class"><%= link_to @work_logs[user.id] == {} ? "0,00" : @work_logs[user.id].gsub(":",","), reports_employee_day_path(:employee_id => user.id, :start_date => @date) %></td>
          </tr>
      <% end %>
    </table>
    <script type="text/javascript">
        $(".sortable-table").tablesorter();
        if ($('.table tbody tr').length > 1){$('table.highchart').highchartTable();}
    </script>
<% else %>
    <div class="alert-box secondary">
      No sufficient data yet.
    </div>
<% end %>